package com.company.project.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 定时任务实体类
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("scheduled_task")
public class ScheduledTaskEntity extends BaseEntity {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField("task_name")
    private String taskName;

    @TableField("target_string")
    private String targetString;

    @TableField("interval_seconds")
    private Integer intervalSeconds;

    @TableField("status")
    private Integer status; // 0-禁用 1-启用

    @TableField("create_id")
    private String createId;

    @TableField("create_time")
    private Date createTime;

    @TableField("update_time")
    private Date updateTime;

    @TableLogic(value = "0", delval = "1")
    @TableField("deleted")
    private Integer deleted;
}
